cmake_minimum_required(VERSION 2.8)
project(CDKtest)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_VERBOSE_MAKEFILE on)

set(POCO_PATH "/opt/cdk/poco/v1.6.0/include")
set(Taiji_PATH "/opt/cdk/taiji/v1.0/include")
set(POCO_LIB_PATH "/opt/cdk/poco/v1.6.0/lib")
set(Taiji_LIB_PATH "/opt/cdk/taiji/v1.0/lib")
###########################设置依赖##########################
#头文件查找路径
include_directories(${POCO_PATH} ${Taiji_PATH})

#依赖库查找路径
link_directories(${POCO_LIB_PATH} ${Taiji_LIB_PATH})

set(SOURCE_FILES main.cpp)

############################设置生成规则############################
add_executable(${PROJECT_NAME} ${SOURCE_FILES})

#依赖库
target_link_libraries(${PROJECT_NAME} PocoFoundation TaijiUtil)

##############################安装步骤#############################
#c++11 支持
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
    message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
